package sing.cloud.alibaba.nacos.provider;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfigurationPackage;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xing
 * @date 2022/8/24 15:53
 */
@SpringBootApplication
@RestController
public class NacosProviderApplication {

    @Value("${server.port}")
    private String port;

    @GetMapping("echo/{string}")
    public String naco(@PathVariable("string") String string) {

        return "in naco provider, hello " + string + ", port: " + port;
    }

    public static void main(String[] args) {
        SpringApplication.run(NacosProviderApplication.class, args);
    }
}
